'''
Created on 16/12/2011

@author: nacho
'''
from stateReady import Ready
from stateRunning import Running
from stateFinished import Finished
from stateBlocked import Blocked
class StateOfPCB(object):
    '''
    classdocs
    '''


    def __init__(self):
        '''
        Constructor
        '''
        pass
    
    
    def run(self, pcb):
        
        pcb.changeStateTo(Running())
        
        
    def ready(self, pcb):
        
        pcb.changeStateTo(Ready())
    
    def needIO(self, pcb):
        
        pcb.changeStateTo(Blocked())
    
    def finish(self, pcb):
        
        pcb.changeStateTo(Finished())
    
    
    def canBeCompiled(self):
        
        return False
    
    